package com.ali.redis;

import java.util.concurrent.TimeUnit;

import org.redisson.api.RLock;

/**
 * 底层封装
 * @author nning_l@163.com
 * @date 2020年4月10日
 */
public interface DistributedLocker {

	RLock lock(String lockKey);
	
	RLock lock(String lockKey, int timeout);
	
	RLock lock(String lockKey, TimeUnit unit, int timeout);
	
	boolean tryLock(String lockKey, TimeUnit unit, int waitTime, int leaseTime);
	
	void unlock(String lockKey);
	
	void unlock(RLock lock);
}
